import {Injectable} from "@angular/core";
import {Subject} from "rxjs/index";

@Injectable({
  providedIn: 'root',
})
export class SharedService {
  // Observable string sources
  private emitChangeSource = new Subject<any>();
  // Observable string streams
  public changeEmitted$ = this.emitChangeSource.asObservable();

  // Service message commands
  emitChange(change: any) {
    this.emitChangeSource.next(change);
  }
}
